<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="聚宝盆,39249，信用卡付货款，信用卡付房租"/>
<meta name="description" content="聚宝盆是由杭州凡伟网络科技有限公司研发的一个中小企业收货款的支付平台，此平台乃中国首创，国内第一家实现收货款的贷款金融功能的服务产品，欢迎新用户注册聚宝盆，马上开始轻松解决企业现金流问题！"/>
<title>我的聚宝盆 - 聚宝网</title>
 
<link type="text/css" media="screen" rel="stylesheet" href="resources/css/global.css">
<link rel="shortcut icon" href="resources/images/favicon.ico" media="all"/>
<link rel="stylesheet" href="resources/css/detail.css" media="all"/>
<link rel="stylesheet" href="resources/css/content.css" media="all"/>
<link rel="stylesheet" href="resources/css/common.css" media="all"/>

<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">  
<link href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet"> 


<script type="text/javascript" src="libs/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="bootstrap/js/bootstrap-modal.js"></script>
	
</head>
<body>
<div class="ui-container">
<!-- 吊顶 -->

<div id="global-header" class="global-header">
	<div id="global-header-area" class="fn-clear" >
		<div class="global-logo">
			   <a href="/index.htm" title="我的聚宝盆"><span>聚宝盆</span></a>
		</div>
		<!--
		<div class="global-toplink">
			您还没有聚宝盆帐号？&nbsp;
			<a href="/register.html">立即注册</a>
			<em class="global-separator">|</em>
			<a href="/login.html">登录</a>
			<br/>
			<span style="margin-top:10px;float:right;">
				第一次使用聚宝盆？
				<a href="/jieshao.html" target="_blank" style="color:blue">点此了解>></a>&nbsp;
			</span>
		</div>--><!-- .global-toplink -->
	</div>
</div>
<!-- 吊顶 -->


<div id="content" class="ui-content" style="overflow:visible">
<form id="form" method="post">
	<div class="error-box" style="display:none"></div>
	<br/>
    <h3>手机号码验证</h3>
	<hr/>
	<div style="margin-bottom:20px">
		<i class="icon-info-sign"></i>您必须先验证您的手机号码才能登录！
	</div>
	<div class="fm-item">
		<label for="ipt-search-key" class="fm-label">
			<span class="required">*</span>手机号码
		</label>
		<input id="mobile" class="i-text required" value="$!{user.mobile}" tabindex="1" style="margin-left:30px"/>
		<div class="fm-explain" id="mobile-tip"></div>
	</div>
	<div class="fm-item">
		<label for="ipt-search-key" class="fm-label required">
			<span class="required">*</span>验证码
		</label>
		<input id="smscode" class="i-text required span1" maxLength="40" tabindex="6" style="margin-left:30px"/>
		<input type="button" class="btn-info input-medium" id="smssend" value="发送手机验证码"/>
		<div class="fm-explain" id="smscode-tip"></div>
	</div>	 
	<div class="fm-item">
		<a class="btn btn-warning" href="javascript:mobileconf()">确定</a>
		<a class="btn btn-inverse" href="loginout.htm">取消</a>
	</div>
</form>
</div>

<!-- 页脚 -->
<div class="ui-footer fn-clear">
    <div class="ui-footer-ctn">
		<div class="ui-footer-link">
	    	<a href="http://www.39249.com/about.html" target="_blank">关于聚宝盆</a>  
	           <em class="ui-separator">|</em>
	       <a  href="http://www.39249.com/prot.html" title="服务协议" target="_blank">聚宝盆服务协议</a>
	           <em class="ui-separator">|</em>
	       <a href="http://www.39249.com/contact.html" title="联系我们" target="_blank">联系我们</a>
			   <em class="ui-separator">|</em>
	       <a href="http://hi.baidu.com/new/i39249" title="官方空间" target="_blank">官方空间</a>
		    <em class="ui-separator">|</em>
	       <a href="http://www.39249.com/partner.html" title="合作伙伴" target="_blank">合作伙伴</a>  	
	      	<em class="ui-separator">|</em>
	       <a href="http://hi.baidu.com/i39249/item/71928b15b19968e638cb3025" title="媒体报道" target="_blank">媒体报道</a>
	    </div>
      	<div class="ui-footer-copyright">
			<div class="copyright">
			  杭州凡伟网络科技有限公司&copy;2012 
			  <a href="#" target="_blank">湘ICP备12005446号</a>
			  <script type="text/javascript">
				var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
				document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F7252c6ea6d9c83e4994e0e92fb0d9799' type='text/javascript'%3E%3C/script%3E"));
			  </script>
			  <script src="http://s16.cnzz.com/stat.php?id=4228610&web_id=4228610&show=pic" language="JavaScript"></script>
			  
			</div>
		</div>
		<div class="ui-footer-copyright">
			<img src="/resources/images/cfcalog.png" align="absmiddle"/>
			<a href="http://webscan.360.cn/index/checkwebsite/url/www.39249.com" target="_blank"><img align="absmiddle" border="0" style="width:100px;height:32px" src="http://webscan.360.cn/status/pai/hash/be9b7b92c0204ce0275b60814fb9ce77"/></a>
			<img src="/resources/images/cnnis.png" style="width:100px;height:32px" align="absmiddle"/>
		</div>
	</div>
</div>
 <!--页脚 -->

<!-- 图片附加码 -->
	
<div class="modal hide fade" id="checkModal">
		<div class="modal-header">
    		<a class="close" data-dismiss="modal">×</a>
    		<h3>请输入图片附加码</h3>
  		</div>
		<div class="modal-body">
		<form class="form-horizontal">
			<div class="control-group">
	      		<label class="control-label" for="input01">验证码</label>
	     		 <div class="controls">
	        		<input type="text" class="span1" id="checkcode">
	        		<img title="看不清，点击换一换" src="/checkCode.htm" width="100" height="20" id="checkCodeImage"  style="margin-bottom: -10px"/>
					<a href="#" id="checkCodeHref">看不清,换一张</a>
					<div class="fm-explain" id="checkcode-tip"></div>
	      		</div>
	    	</div>
	    	<div class="control-group">
          		<label class="control-label"></label>
	          <div class="controls">
	            <a class="btn btn-success" href="javascript:picCodeConf()" >确认</a>
	            <a class="btn" href="#" data-dismiss="modal">取消</a>
	          </div>
        	</div>
	    </form>
		</div>
</div>	
	
</div>
<script type="text/javascript">
	
	$('form :input').blur(function(){
		var $parent = $(this).parent();
		$parent.find(".formtips").remove();
		
		
		if($(this).is('#mobile')){
			$("#smssend").prop("disabled",false);
			$("#smssend").addClass("btn-info");
			var pattern = /^(13[0-9]|147|15[0|1|2|3|5|6|7|8|9]|18[0|2|3|5|6|7|8|9])\d{8}$/;
			if(this.value == "" || this.value == null || !pattern.test(this.value)){
				$('#mobile-tip').empty();
				$('#mobile-tip').append("<span class='formtips onError' style='color:red'>请填写手机号码</span>");
				$("#smssend").prop("disabled",true);
				$("#smssend").removeClass("btn-info");
			}
		}
		
		if($(this).is('#smscode')){
			if(this.value == "" || this.value == null){
				$("#smscode-tip").empty();
				$("#smscode-tip").append("<span class='formtips onError' style='color:red'>请输入验证码</span>");
			}
		}
	});
	
	function mobileconf(){
		$("form .required:input").trigger('blur');
		var numError = $('form .onError').length;
		if(numError){
			return false;
		}
		
		$ .post('/mobileconfhandler.htm',{
			'mobile':$("#mobile").val(),
			'smscode':$("#smscode").val()
    	},function(data){
    		if(data == "success"){
    			window.location.href ="/index.htm";
    		}else{
    			if(data == "codeError"){
    				$("#smscode-tip").empty();
    				$("#smscode-tip").append("<span class='formtips onError' style='color:red'>验证码错误或者已失效，请重新获取！</span>");
    			}else if(data == "mobileError"){
    				$("#mobile-tip").empty();
    				$("#mobile-tip").append("<span class='formtips onPass' style='color:green'>该手机号码已被注册</span>");
    			}else{
    				$(".error-box").empty();
    				$(".error-box").css("display", "block").append(data);
    			}
    		}
    	});
	}
	
	          
    $('#checkCodeImage').click(function () {//生成验证码  
     	$(this).hide().attr('src', '/checkCode.htm?' + Math.floor(Math.random()*100) ).fadeIn(); 
    });     
	
	$('#checkCodeHref').click(function () {//生成验证码  
     	$('#checkCodeImage').hide().attr('src', '/checkCode.htm?' + Math.floor(Math.random()*100) ).fadeIn(); 
	});      
	
	$("#smssend").click(function(){
		$('#checkCodeImage').trigger('click');
		$('#checkcode').val("");
		$('#checkModal').modal({
			backdrop:true,
			keyboard:true,
			show:true
		});
		
	});
	
	function picCodeConf(){
		var pattern = /^(13[0-9]|147|15[0|1|2|3|5|6|7|8|9]|18[0|2|3|5|6|7|8|9])\d{8}$/;
		
		if($("#mobile").val() == null || $("#mobile").val() =="" || !pattern.test($("#mobile").val())){
			alert("请输入手机号码");
			return ;
		}
		
		$ .post('/checkCodeConf.htm',{
			'mobile':$("#mobile").val(),
			'checkCode':$("#checkcode").val(),
			'type':2
		},function(data){
			if(data == "error"){
				$('#checkModal').modal('show');
				$("#checkcode-tip").empty();
				$("#checkcode-tip").append("<span class='formtips onError' style='color:red'>图片附加码错误,请重新输入</span>");
				return false;
			}else{
				$('#checkModal').modal('hide');
				var count = 60;
				var countdown = window.setInterval(function(){
					if(count <= 0){
						$("#smssend").val("发送手机验证码");
						$("#smssend").prop("disabled",false);
						$("#smssend").addClass("btn-info");
						window.clearInterval(countdown);
					}else{
						$("#smssend").val(count+"秒后再次获取验证码");	
						$("#smssend").prop("disabled",true);
						$("#smssend").removeClass("btn-info");
						count--;
					}
				  }, 1000);
			}
		});	
	}
	
	
</script>
</body>
</html>